package br.edu.ufcg.lsd.wbis.ui.client.ui.loggedin.util;

import com.gwtext.client.core.EventObject;
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.event.ButtonListenerAdapter;

/**
 * @author Renato Miceli
 */
public class RandomizerButtonListener extends ButtonListenerAdapter {

	private final Randomizer randomizer;

	public RandomizerButtonListener(Randomizer randomizer) {
		this.randomizer = randomizer;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public void onClick(Button button, EventObject e) {
		this.randomizer.randomize();
	}

}
